<template>
	<view class="">
		<u-modal title="" :show="ChargeCar14show" :mask-close-able="true" :show-title="false">
			<!-- <u-modal :show="show" :title="title" :content='content'> -->
			<view class="">
				<view class="title u-flex u-row-center z-type-cdz">
					{{ $z.$t("充电须知") }}
				</view>
				<view class="item">
					{{
            $z.$t(
              "1、此车位为新能源汽车充电车位，在车辆充电期间将不收取占位费，只收取充电费用。燃油车及非充电新能源车辆将收取占位费。"
            )
          }}
				</view>
				<view class="item">
					{{ $z.$t("2、请将车辆停到车位锁上方。") }}
				</view>
				<view class="item">
					{{ $z.$t("3、本车位充电时间内不收取占位费。") }}
				</view>
				<view class="item">
					{{ $z.$t("4、开锁前需用户卡内余额不低于{0}元", ChargeCar.df / 100) }}
				</view>
				<view class="item">
					{{ $z.$t("5、占位费收费详细可看公示。") }}
				</view>
				<view class="item">
					{{ $z.$t("6、地锁在无遮挡物的情况下120秒后自动升起。") }}
				</view>
				<view class="item">
					{{ $z.$t("7、地锁在无遮挡物的情况下手动点击相应按钮可立刻升起。") }}
				</view>
				<view class="item">
					{{
            $z.$t(
              "8、充电结束您将收到公众号充电结束提醒，请及时挪车，避免额外支付占位费."
            )
          }}
				</view>
				<view class="item">
					{{ $z.$t("9、为车辆充电时需要先插好充电枪再点击充电按钮。") }}
				</view>
				<view class="item">
					{{
            $z.$t(
              "10、充电过程中请勿拔插充电枪，否则将需要复位车位锁后重新开启新的订单进行充电。"
            )
          }}
				</view>
				<view class="item">
					{{
            $z.$t(
              "温馨提示：若不充电或已完成充电，请手机上操作车位锁完全上升后离开，否则其它车辆进入后将会扣取您的占位费"
            )
          }}
				</view>
			</view>
			<template #confirmButton>
				<view style="padding: 0 20rpx">
					<u-button type="primary" @click="close()">
						{{ $z.$t("我已知晓") }}
					</u-button>
				</view>
			</template>
		</u-modal>
	</view>
</template>

<script>
	import qs from "qs";
	//道闸模式
	export default {
		props: {
			ChargeCar: {
				type: Object,
				default: () => {},
			},
		},
		data() {
			return {
				ChargeCar14show: false,
				isShowParkingLock: false,
				selectedTd: null,
				parkingLockObj: {},
				reqdata: {}
			};
		},
		watch: {},
		computed: {

			mini14je() {
				let p = this.$u.$parent.call(this, "Chargecar");
				if (p) {
					return p.mini14je;
				}
				return 0;
			},

			kafalg() {
				let p = this.$u.$parent.call(this, "Chargecar");

				if (p) {
					return Number(p.USearch.je) >= Number(this.mini14je);
				}
				return true;
			},
		},
		onShow() {

		},
		methods: {
			init() {

				this.ChargeCar14show = true;
			},
			async close() {
				this.ChargeCar14show = false;

			},
			selectItem(item) {

			},
			async confirmSelection() {
				// 确认逻辑 打开地锁

				if (JSON.stringify(this.parkingLockObj) === '{}') {
					this.$u.toast(this.$z.$t("请选择地锁通道"));
					return
				}
				let RoadOpen = await uni.$z.request("/RoadOpen", {
					gtel: this.ChargeCar.gtel,
					td: this.parkingLockObj.td
				});
				if (RoadOpen[0].par == 'succeed') {
					this.zfokfn()
					// let ChargeAsk = await this.$z.request("/ChargeAsk", {
					// 	gtel: this.ChargeCar.gtel,
					// 	td: this.parkingLockObj.td,
					// })
					// if (ChargeAsk[0].par == 'succeed') {
					// 	this.isShowParkingLock = false
					// 	this.$u.toast(this.$z.$t("操作成功"));

					// } else {
					// 	this.isShowParkingLock = false
					// 	this.$u.toast(this.$z.$t("操作失败"));
					// }
				}
			},
			cancelSelection() {
				this.isShowParkingLock = false
				// 取消逻辑
				// this.items.forEach(item => {
				// 	item.status = 'idle';
				// });
			},

		}

	};
</script>

<style lang="scss" scoped>
	.title {
		font-size: 28rpx;
		padding: 40rpx 20rpx;
		padding-right: 40rpx;
		padding-top: 0;
	}

	.item {
		padding: 0 0rpx 20rpx 0rpx;
		font-size: 24rpx;
		color: $uni-text-color-grey;
		line-height: 1.4;
	}

	.yeitem {
		color: $uni-color-error;
		text-align: center;
	}

	.station-gteltd {
		width: 100%;

		.btn {
			display: flex;
			justify-content: space-between;


			.tditem {
				width: 98%;
				margin-right: 4%;

				&:last-of-type {

					margin-right: 0%;
				}

			}
		}

		.buttons {
			margin-top: 40rpx;
			display: flex;
		}
	}
</style>